package org.bonorsoft.modules.wechat.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface PicturePhotoMapper {
    @Insert("insert into picture_photo(id, photo_path) values (#{id}, #{photo})")
    int addPhoto(String id, String photo);

    @Delete("delete from picture_photo where id = #{id}")
    void deletePhoto(String id);

    @Select("select photo_path from picture_photo where id = #{id}")
    String getPhoto(String id);

    @Select("select count(1) from picture_photo where id = #{id}")
    int count(String id);

    @Update("update picture_photo set photo_path = #{photo} where id = #{id}")
    int update(String id, String photo);

}
